<template>
	<view class="content">
		<view class="box" v-for="(item,index) of list" :key="index">
			<view class="row1">
				<text>{{item.note}}</text>
				<text v-if="item.addordeduct=='add'" class="you">+{{item.amount}}</text>
				<text v-else class="you">{{item.amount}}</text>
			</view>
			<view class="row2">
				<text>{{item.create_at|formatDate}}</text>
				<text>手动划转</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[]
			}
		},
		onLoad() {
			this.getinfo()
		},
		methods: {
			getinfo(){
				var token =uni.getStorageSync('token')
				if(token==''||token==null){
					uni.reLaunch({
					    url:'../login/login'
					})
				}else{
					this.http({
					 	url:'/api/Page/transLogs',
					 	method:'POST',
						header:{
							'token':token
						},
					 	success:(res)=>{
							console.log(res)
							this.list =res.data
						},
					 	error:()=>{
					 		uni.showToast({
					 			title:"请求异常"	
					 		})
					 	},	
					 })
				}
			}
		}
	}
</script>

<style lang="scss">
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		font-family: PingFang SC;
		font-weight: 500;
		color:#2b2b2b;
		padding-bottom: 50rpx;
		.box{
			width: 690rpx;
			height: 128rpx;
			background: #FFFFFF;
			box-shadow: 0px 0px 3px 0px rgba(43, 43, 43, 0.18);
			border-radius: 5px;	
			margin: 20rpx auto;
			.row1{
				width: 628rpx;
				display: flex;
				justify-content: space-between;
				margin: 20rpx auto ;
				font-size: 30rpx;
				.you{
					color: #0072FF;
				}
			}
			.row2{
				width: 628rpx;
				display: flex;
				justify-content: space-between;
				margin: 0 auto;
				font-size: 26rpx;
				color: #CCCCCC;
			}
		}
	}

	
</style>
